package com.deng.api.controller;

import com.deng.api.service.ICloudDepartmentService;
import com.deng.commons.common.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author deng
 * @since 2022-08-10
 */
@RestController
@RequestMapping("/api/dept/")
@Api(tags = "公司部门操作")
public class CloudDepartmentController {
    @Resource
    private ICloudDepartmentService iCloudDepartmentService;

    @GetMapping("/all")
    @ApiOperation("获取所有部门信息")
    public BaseResult getDeptAll(@RequestParam(defaultValue = "1") Integer page,
                                 @RequestParam(defaultValue = "10") Integer size,
    String name){
        return iCloudDepartmentService.getDeptAll(page,size,name) ;
    }
}
